home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 3 / Amiga Tools 3.iso / grafik / raytracing / rayshade-4.0.6.3 / examples / coin.ray < prev    next >
Encoding:
Text File  |  1994-08-09  |  1.2 KB  |  55 lines

  1. /*
  2.  * Rayshade animation example.
  3.  * Copperish coin flipping on ground plane.
  4.  *
  5.  * Craig Kolb and Rod Bogart
  6.  * March, 1991
  7.  *
  8.  * coin.ray,v 4.1 1994/08/09 07:41:38 explorer Exp
  9.  *
  10.  * coin.ray,v
  11.  * Revision 4.1  1994/08/09  07:41:38  explorer
  12.  * Bump version to 4.1
  13.  *
  14. # Revision 1.1.1.1  1994/08/08  04:51:57  explorer
  15. # Initial import.  This is a prerelease of 4.0.6enh3, or 4.1 possibly.
  16. #
  17.  * Revision 4.0  91/07/17  14:25:52  kolb
  18.  * Initial version.
  19.  * 
  20.  *
  21.  */
  22. surface copper ambient 0.2 0.05 0.05 diffuse 0.7 0.3 0.2
  23.     specular 0.8 0.4 0.4
  24. sample 4 jitter
  25. plane 0 0 0 0 0 1
  26.  
  27. name coin list
  28.     cylinder 1  0 0 0  0 0 0.2
  29.     disc 1 0 0 0  0 0 -1
  30.     disc 1 0 0 .2  0 0 1
  31. end
  32.  
  33. frames 32
  34. define length 30    /* # of frames of movement */
  35. define flips 4        /* # of flips performed by coin */
  36. define zenith 7        /* height at top of flip */
  37.  
  38. define spin (linear(0, 0, length, 360 * flips))     /* theta */
  39. define ground (linear(0, 2, length, -2))     /* translation */
  40.  
  41. define shift (linear(0,0,length,length) - length / 2)
  42. define height (zenith * ( 1 - shift * shift / (length * length / 4) ))
  43.  
  44. object copper coin
  45.     rotate 1 -1 0  (spin)
  46.     translate (ground) (ground) (height)
  47.  
  48. eyep 0 -9 4
  49. lookp 0 0 (zenith / 2)
  50. fov 55
  51. screen 400 400
  52. shutter 1
  53. framelength 1
  54. starttime -1
  55.